From: Keir Fraser Date: Tue, 16 Jun 2009 12:33:12 +0000 (+0100) Subject: x86, hvm: fix a domain_lock leak X-Git-Tag: archive/raspbian/4.8.0-1+rpi1~1^2~13762 X-Git-Url: https://dgit.raspbian.org/%22http:/www.example.com/cgi/%22https:/%22bookmarks://%22Dat/%22http:/www.example.com/cgi/%22https:/%22bookmarks:/%22Dat?a=commitdiff_plain;h=9640ac9154bd4927f4e1a1d4d3be03df6e5ea429;p=xen.git x86, hvm: fix a domain_lock leak Signed-off-by: Kouya Shimura --- diff --git a/xen/arch/x86/hvm/hvm.c b/xen/arch/x86/hvm/hvm.c index 8361526ad2..561e30d15b 100644 --- a/xen/arch/x86/hvm/hvm.c +++ b/xen/arch/x86/hvm/hvm.c @@ -512,11 +512,13 @@ static int hvm_load_cpu_ctxt(struct domain *d, hvm_domain_context_t *h) vc = &v->arch.guest_context; /* Need to init this vcpu before loading its contents */ + rc = 0; domain_lock(d); if ( !v->is_initialised ) - if ( (rc = boot_vcpu(d, vcpuid, vc)) != 0 ) - return rc; + rc = boot_vcpu(d, vcpuid, vc); domain_unlock(d); + if ( rc != 0 ) + return rc; if ( hvm_load_entry(CPU, h, &ctxt) != 0 ) return -EINVAL; @@ -2296,7 +2298,7 @@ static void hvm_s3_suspend(struct domain *d) vpic_reset(d); vioapic_reset(d); pit_reset(d); - rtc_reset(d); + rtc_reset(d); pmtimer_reset(d); hpet_reset(d);